from django.db import models
from django.contrib import admin
import logging
logger = logging.getLogger(__name__)

# Create your models here.

class BlogPost(models.Model):
    blogid=models.AutoField(primary_key=True)
    title = models.CharField(max_length=150)
    body = models.TextField()
    timestamp = models.DateTimeField()
    logger.info("BlogPost模型创建完毕。")
class BlogPostAdmin(admin.ModelAdmin):
    list_display = ("blogid","title","timestamp")